package one.stand.feign;

import one.stand.fallback.CrmFallBack;
import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.response.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Component
@FeignClient(value = "crm-service", fallback = CrmFallBack.class, decode404 = true)
public interface CrmFegin {



    /**
     * 录入跟进记录
     *
     * @param request
     * @return
     */
    @PostMapping("followRecord/addFollow")
    ResultModel<Boolean> addFollow(@RequestBody FollowRecordRequest request);

    /**
     * 获取跟进记录
     *
     * @param request
     * @return
     */
    @PostMapping("followRecord/getFollowList")
    ResultModel<List<FollowRecordResponse>> getFollowList(@RequestBody FollowRecordRequest request);

    /**
     * 获取公司员工
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCompanyStaffList")
    ResultModel<Map<String, Object>> getCompanyStaffList(@RequestBody BusinessCardRequest request);

    /**
     * 修改用户名片欢迎语
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/updateCardWelcomeSpeech")
    ResultModel<Boolean> updateCardWelcomeSpeech(@RequestBody BusinessCardRequest request);

    /**
     * 获取员工列表
     * @param request
     * @return
     */
    @PostMapping("businessCard/getList")
    ResultModel<List<BusinessCardResponse>> getList(@RequestBody BusinessCardRequest request);

    /**
     * 获取员工详细信息
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCompanyUserInfo")
    ResultModel getCompanyUserInfo(@RequestBody BusinessCardRequest request);

    /**
     * 得到名片海报
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCardPoster")
    ResultModel getCardPoster(@RequestBody BusinessCardRequest request);


    /**
     * 录入企业员工本月目标
     *
     * @param request
     * @return
     */
    @PostMapping("userTask/addMoneyNum")
    ResultModel addMoneyNum(@RequestBody UserTaskRequest request);

    /**
     * 企业员工移交客户
     *
     * @param request
     * @return
     */
    @PostMapping("userTask/moveCustomer")
    ResultModel moveCustomer(@RequestBody CustomerRequest request);

    /**
     * 企业员工退出企业
     *
     * @param request
     * @return
     */
    @PostMapping("userTask/quitCompany")
    ResultModel quitCompany(@RequestBody BusinessCardRequest request);

    /**
     * 解散企业
     *
     * @param request
     * @return
     */
    @PostMapping("userTask/dissolutionCompany")
    ResultModel dissolutionCompany(@RequestBody BusinessCardRequest request);

    /**
     * 添加公司
     *
     * @param request
     * @return
     */
    @PostMapping("company/addCompany")
    ResultModel<Boolean> addCompany(@RequestBody CompanyRequest request);

    /**
     * 获取公司信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/invitation")
    ResultModel<CompanyResponse> invitation(@RequestBody CompanyRequest request);

    /**
     * 个人企业
     * @param request
     * @return
     */
    @PostMapping("company/getCompany")
    ResultModel<CompanyResponse> getCompany(@RequestBody CompanyRequest request);

    @PostMapping("company/getCompanyId")
    ResultModel<CompanyResponse> getCompanyId(@RequestBody CompanyRequest request);

    /**
     * 查询公司信息(用于下拉列表查询)
     * @param request
     * @return
     */
    @PostMapping("company/getCompanyAllInfo")
    ResultModel getCompanyAllInfo(@RequestBody CompanyRequest request);

    /**
     * 修改公司
     *
     * @param request
     * @return
     */
    @PostMapping("company/updCompany")
    ResultModel<Boolean> updCompany(@RequestBody CompanyRequest request);

    /**
     * 查询公司动态/文章
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectDynamicInfo")
    ResultModel<List<DynamicResponse>> selectDynamicInfo(@RequestBody DynamicRequest request);

    /**
     * 查询所有评论/回复
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectComment")
    ResultModel selectComment(@RequestBody CommentRequest request);

    /**
     * 查询公司动态/文章详细信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/getDynamicInfo")
    ResultModel<List<DynamicResponse>> getDynamicInfo(@RequestBody DynamicRequest request);

    /**
     * 添加/修改公司动态/文章
     *
     * @param request
     * @return
     */
    @PostMapping("company/addDynamicInfo")
    ResultModel addDynamicInfo(@RequestBody DynamicRequest request);

    /**
     * crm回复
     *
     * @param request
     * @return
     */
    @PostMapping("company/doComment")
    ResultModel doComment(@RequestBody CommentRequest request);

    /**
     * crm删除评论
     *
     * @param request
     * @return
     */
    @PostMapping("company/delComment")
    ResultModel delComment(@RequestBody CommentRequest request);

    /**
     * 删除公司动态/文章
     *
     * @param request
     * @return
     */
    @PostMapping("company/delDynamicInfo")
    ResultModel delDynamicInfo(@RequestBody DynamicRequest request);

    /**
     * 查询公司官网信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectWebsiteInfo")
    ResultModel selectWebsiteInfo(@RequestBody WebsiteRequest request);

    /**
     * 查询公司官网表单提交信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectDemand")
    ResultModel selectDemand(@RequestBody DemandRequest request);

    /**
     * 添加/修改公司官网信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/addWebsiteInfo")
    ResultModel addWebsiteInfo(@RequestBody WebsiteRequest request);

    /**
     * 添加公司視頻
     *
     * @param request
     * @return
     */
    @PostMapping("company/insertCompanyVideo")
    ResultModel<Boolean> insertCompanyVideo(@RequestBody CompanyVideoRequest request);

    /**
     * 删除公司視頻
     *
     * @param request
     * @return
     */
    @PostMapping("company/delCompanyVideo")
    ResultModel<Boolean> delCompanyVideo(@RequestBody CompanyVideoRequest request);

    /**
     * 删除公司視頻
     *
     * @param request
     * @return
     */
    @PostMapping("company/moveCompanyVideo")
    ResultModel<Boolean> moveCompanyVideo(@RequestBody CompanyVideoRequest request);

    /**
     * 查询公司招聘信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectCompanyRecruit")
    ResultModel<List<CompanyRecruitResponse>> selectCompanyRecruit(@RequestBody CompanyRecruitRequest request);

    /**
     * 添加/修改公司招聘信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/addCompanyRecruit")
    ResultModel addCompanyRecruit(@RequestBody CompanyRecruitRequest request);

    /**
     * 添加招聘HR电话
     *
     * @param request
     * @return
     */
    @PostMapping("company/addHrPhone")
    ResultModel addHrPhone(@RequestBody CompanyRequest request);

    /**
     * 删除公司招聘信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/delCompanyRecruit")
    ResultModel delCompanyRecruit(@RequestBody CompanyRecruitRequest request);


    /**
     * 获取商品分享海报图
     * @param request
     * @return
     */
    @PostMapping("company/invitePoster")
    ResultModel<String> invitePoster(@RequestBody CompanyRequest request);
    /**
     * 添加标签
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/addLable")
    ResultModel<Long> addLable(@RequestBody CompanyCustomerLableRequest request);

    /**
     * 添加标签list
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/addLableList")
    ResultModel<Boolean> addLableList(@RequestBody CompanyCustomerLableRequest request);

    /**
     * 删除标签
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/delLable")
    ResultModel<Boolean> delLable(@RequestBody CompanyCustomerLableRequest request);


    /**
     * 获取客户标签树
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/getTree")
    ResultModel<List<CompanyCustomerLableResponse>> getTree(@RequestBody CompanyCustomerLableRequest request);


    /**
     * 修改标签
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/updLable")
    ResultModel<Boolean> updLable(@RequestBody CompanyCustomerLableRequest request);


    /**
     * 存为客户
     *
     * @param request
     * @return
     */
    @PostMapping("customer/addCustomer")
    ResultModel<Boolean> addCustomer(@RequestBody CustomerRequest request);

    /**
     * 客户类型分组统计
     *
     * @param request
     * @return
     */
    @PostMapping("customer/countCustomer")
    ResultModel<List<CustomerResponse>> countCustomer(@RequestBody CustomerRequest request);

    /**
     * 获取客户列表
     *
     * @param request
     * @return
     */
    @PostMapping("customer/getCustomer")
    ResultModel<List<CustomerResponse>> getCustomer(@RequestBody CustomerRequest request);

    /**
     * 获取客户信息
     *
     * @param cardId
     * @return
     */
    @PostMapping("customer/getCustomerInfo")
    ResultModel<GetCustomerInfoResponse> getCustomerInfo(@RequestParam("cardId") Long cardId);

    /**
     * 手动创建客户
     *
     * @return
     */
    @PostMapping("customer/manualAdd")
    ResultModel<Boolean> manualAdd(@RequestBody CustomerRequest request);

    /**
     * 修改客户类型
     *
     * @return
     */
    @PostMapping("customer/updCustomer")
    ResultModel<Boolean> updCustomer(@RequestBody CustomerRequest request);

    /**
     * 录入成交金额
     *
     * @return
     */
    @PostMapping("/customer/inputDealMoney")
    ResultModel<Boolean> inputDealMoney(@RequestBody InputDealMoneyRequest request);

    /**
     * 获取行业
     *
     * @param
     * @return
     */
    @PostMapping("industry/getList")
    ResultModel<List<IndustryResponse>> getList();


    /**
     * 客户分析
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/customerAnalysis")
    ResultModel customerAnalysis(@RequestBody SeeRecordRequest request);

    /**
     * 名片查看记录
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/getSeeRecordList")
    ResultModel<List<CrmSeeRecordResponse>> getSeeRecordList(@RequestBody SeeRecordRequest request);

    /**
     * CRM端PC端首页统计
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/getPcCount")
    ResultModel getPcCount(@RequestBody SeeRecordRequest request);

    /**
     * 根据公司ID查询产品分类（包含商品信息）
     */
    @PostMapping("goods/selectGoodsTypeInfo")
    ResultModel selectGoodsTypeInfo(@RequestBody GoodstypeRequest request);

    /**
     * 查询简单商品分类
     */
    @PostMapping("goods/getGoodsTypeInfo")
    ResultModel getGoodsTypeInfo(@RequestBody GoodstypeRequest request);

    /**
     * 添加/修改商品分类
     */
    @PostMapping("goods/addGoodsType")
    ResultModel addGoodsType(@RequestBody GoodstypeRequest request);

    /**
     * 删除商品分类
     */
    @PostMapping("goods/delGoodsType")
    ResultModel delGoodsType(@RequestBody GoodstypeRequest request);

    /**
     * 上移/下移商品分类
     */
    @PostMapping("goods/moveGoodsType")
    ResultModel moveGoodsType(@RequestBody GoodstypeRequest request);

    /**
     * 查询商品信息
     */
    @PostMapping("goods/getGoodsInfo")
    ResultModel getGoodsInfo(@RequestBody GoodsRequest request);

    /**
     * 添加/修改商品信息
     */
    @PostMapping("goods/addGoodsInfo")
    ResultModel addGoodsInfo(@RequestBody GoodsRequest request);

    /**
     * 添加/修改商品信息list
     */
    @PostMapping("goods/addGoodsInfoList")
    ResultModel addGoodsInfoList(@RequestBody GoodsRequest request);

    /**
     * 添加/修改商品信息
     */
    @PostMapping("goods/addGoodSpecInfo")
    ResultModel addGoodSpecInfo(@RequestBody GoodSpecRequest request);

    /**
     * 删除商品信息
     */
    @PostMapping("goods/delGoodsInfo")
    ResultModel delGoodsInfo(@RequestBody GoodsRequest request);

    /**
     * 删除商品信息
     */
    @PostMapping("goods/delGoodSpecInfo")
    ResultModel delGoodSpecInfo(@RequestBody GoodSpecRequest request);

    /**
     * 根据公司查询订单("订单状态（1待付款，2待发货，3待收货，4已完成，5交易取消，6退款成功）")
     */
    @PostMapping("orders/selectOrdersInfo")
    ResultModel selectOrdersInfo(@RequestBody OrdersRequest request);

    /**
     * 查询订单详情
     */
    @PostMapping("orders/getOrdersInfo")
    ResultModel<List<OrdersResponse>> getOrdersInfo(@RequestBody OrdersRequest request);

    /**
     * 修改订单状态("订单状态（1待付款，2待发货，3待收货，4已完成，5交易取消，6退款成功）")
     * 撤销订单，确认发货
     */
    @PostMapping("orders/updateOrderState")
    ResultModel updateOrderState(@RequestBody OrdersRequest request);

    /**
     * 修改订单退款状态1未申请，2退款申请中，3退款成功
     */
    @PostMapping("orders/updateRefundState")
    ResultModel updateRefundState(@RequestBody OrdersRequest request);

    /**
     * 退款异步回调
     */
    @PostMapping("orders/backRefund")
    String backRefund(@RequestParam(value="request") String request);

    /**
     * 公司财务统计-总收入
     *
     * @param request
     * @return
     */
    @PostMapping("finance/getGrossIncome")
    ResultModel getGrossIncome(@RequestBody FinanceRequest request);

    /**
     * 公司财务统计-商城流水
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectFinanceMall")
    ResultModel<Map<String, Object>> selectFinanceMall(@RequestBody FinanceRequest request);

    /**
     * 公司财务统计-成交流水
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectFinanceDeal")
    ResultModel<Map<String, Object>> selectFinanceDeal(@RequestBody FinanceRequest request);

    /**
     * 公司财务统计-公司流水
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectFinanceCompany")
    ResultModel<Map<String, Object>> selectFinanceCompany(@RequestBody FinanceRequest request);

    /**
     * 公司销售排行-客户人数
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectCustomerNum")
    ResultModel<Map<String, Object>> selectCustomerNum(@RequestBody FinanceRequest request);

    /**
     * 公司销售排行-订单量
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectOrderNum")
    ResultModel<Map<String, Object>> selectOrderNum(@RequestBody FinanceRequest request);

    /**
     * 公司销售排行-互动频率
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectInteractionNum")
    ResultModel<Map<String, Object>> selectInteractionNum(@RequestBody FinanceRequest request);

    /**
     * 公司销售排行-成交率区间
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectDelNum")
    ResultModel<Map<String, Object>> selectDelNum(@RequestBody FinanceRequest request);

    /**
     * 修改客户类型
     * @param request
     * @return
     */
    @PostMapping("customer/updCustomerState")
    ResultModel<String> updCustomerState(@RequestBody CustomerRequest request);

    /**
     * 修改客户标签
     * @param request
     * @return
     */
    @PostMapping("customer/updCustomerLabel")
    ResultModel<String> updCustomerLabel(@RequestBody CustomerRequest request);

    /**
     * 获取成交记录
     * @param request
     * @return
     */
    @PostMapping("inputDealMoney/getInputDealList")
    ResultModel<List<InputDealMoneyResponse>> getInputDealList(@RequestBody InputDealMoneyRequest request);

    /**
     * 企业客户下拉框
     * @param request
     * @return
     */
    @PostMapping("customer/getCustomerList")
    ResultModel<List<CustomerResponse>> getCustomerList(@RequestBody CustomerRequest request);

    /**
     * 客户兴趣统计
     * @param request
     * @return
     */
    @PostMapping("seeRecord/countCustomerAnalysis")
    ResultModel countCustomerAnalysis(@RequestBody SeeRecordRequest request);

    /**
     * 个人数据统计/企业数据统计
     *
     * @return
     */
    @RequestMapping("dataCount/personalData")
    ResultModel personalData(@RequestBody FinanceRequest request);

    /**
     * 近7日成交额
     *
     * @return
     */
    @RequestMapping("dataCount/sevenData")
    ResultModel sevenData(@RequestBody  FinanceRequest request);

    /**
     * 数据汇总
     *
     * @return
     */
    @RequestMapping("dataCount/dataSummary")
    ResultModel dataSummary(@RequestBody  FinanceRequest request);

    /**
     * 成交率漏斗
     *
     * @return
     */
    @RequestMapping("dataCount/turnoverRate")
    ResultModel turnoverRate(@RequestBody  FinanceRequest request);

    /**
     * 新增客户数
     *
     * @return
     */
    @RequestMapping("dataCount/newCustomerNum")
    ResultModel newCustomerNum(@RequestBody  FinanceRequest request);

    /**
     * 咨询客户数
     *
     * @return
     */
    @RequestMapping("dataCount/followCustomerNum")
    ResultModel followCustomerNum(@RequestBody  FinanceRequest request);

    /**
     * 跟进客户数
     *
     * @return
     */
    @RequestMapping("dataCount/consultationNum")
    ResultModel consultationNum(@RequestBody  FinanceRequest request);

    /**
     * 近15日客户活跃数
     *
     * @return
     */
    @RequestMapping("dataCount/activeCustomerNum")
    ResultModel activeCustomerNum(@RequestBody  FinanceRequest request);

    /**
     * 添加咨询记录
     *
     * @return
     */
    @PostMapping("dataCount/addConsultRecord")
    ResultModel addConsultRecord(@RequestBody ConsultRecordRequest request);

    /**
     * 添加商品转发记录
     *
     * @return
     */
    @PostMapping("dataCount/addGoodsForwardRecord")
    ResultModel addGoodsForwardRecord(@RequestBody GoodsForwardRecordRequest request);

    /**
     * 添加文章转发记录
     *
     * @return
     */
    @PostMapping("dataCount/addDynamicForwardRecord")
    ResultModel addDynamicForwardRecord(@RequestBody DynamicForwardRecordRequest request);

    /**
     * 转移产品
     */
    @PostMapping("goods/transferGoods")
    ResultModel transferGoods(@RequestBody GoodsRequest request);

    /**
     * 得到名片二维码
     */
    @PostMapping("/businessCard/getWxTwoCode")
    ResultModel getWxTwoCode(@RequestBody BusinessCardRequest request);

    /**
     * 验证名片是否过期
     */
    @PostMapping("/businessCard/verifyExpired")
    ResultModel<Long> verifyExpired(@RequestBody BusinessCardRequest request);

    /**
     * 用户可接收微信推送次数
     */
    @PostMapping("/businessCard/formIdCount")
    ResultModel<Integer> formIdCount(@RequestBody BusinessCardRequest request);

    /**
     * 清空微信推送次数
     */
    @PostMapping("/businessCard/delFormId")
    ResultModel<Boolean> delFormId(@RequestBody BusinessCardRequest request);

    /**
     * 查询用户常用语（3.2版本迭代）
     */
    @PostMapping("/businessCard/selectUserCommonList")
    ResultModel<List<UserCommonResponse>> selectUserCommonList(@RequestBody UserCommonRequest request);

    /**
     * 新增/修改用户常用语（3.2版本迭代）
     */
    @PostMapping("/businessCard/insertUserCommonList")
    ResultModel<Boolean> insertUserCommonList(@RequestBody UserCommonRequest request);

    /**
     * 删除用户常用语（3.2版本迭代）
     */
    @PostMapping("/businessCard/delUserCommonList")
    ResultModel<Boolean> delUserCommonList(@RequestBody UserCommonRequest request);

    /**
     * 上下移动用户常用语（3.2版本迭代）
     */
    @PostMapping("/businessCard/moveUserCommon")
    ResultModel<Boolean> moveUserCommon(@RequestBody UserCommonRequest request);


    @PostMapping("notice/selectEffectiveList")
    ResultModel<List<NoticeResponse>> selectEffectiveList(@RequestBody NoticeRequest request);

    /**
     * 根据公司ID查询预约管理中预约列表数和产品管理数
     */
    @PostMapping("products/getProductsCount")
    ResultModel<Map<String, Object>> getProductsCount(@RequestBody AppointmentRequest request);

    /**
     * 查询公司预约商品类型（下拉框显示）
     */
    @PostMapping("products/selectProductsTypeList")
    ResultModel<List<ProductsTypeResponse>> selectProductsTypeList(@RequestBody ProductsTypeRequest request);

    /**
     * 分页查询公司预约商品类型
     */
    @PostMapping("products/selectProductsTypePage")
    ResultModel<Map<String, Object>> selectProductsTypePage(@RequestBody ProductsTypeRequest request);

    /**
     * 查询公司预约商品类型（包含类型下的商品信息）
     */
    @PostMapping("products/selectProductsType")
    ResultModel<List<ProductsTypeResponse>> selectProductsType(@RequestBody ProductsTypeRequest request);

    /**
     * 新增/修改预约商品类型
     */
    @PostMapping("products/insertProductsType")
    ResultModel<Boolean> insertProductsType(@RequestBody ProductsTypeRequest request);

    /**
     * 删除预约商品类型
     */
    @PostMapping("products/delProductsType")
    ResultModel<Boolean> delProductsType(@RequestBody ProductsTypeRequest request);

    /**
     * 上移/下移商品类型
     */
    @PostMapping("products/moveProductsType")
    ResultModel<Boolean> moveProductsType(@RequestBody ProductsTypeRequest request);

    /**
     * 分页查询公司预约商品信息
     */
    @PostMapping("products/selectProductsPage")
    ResultModel<Map<String, Object>> selectProductsPage(@RequestBody ProductsRequest request);

    /**
     * 查询公司预约商品信息
     */
    @PostMapping("products/getProductsInfo")
    ResultModel<ProductsResponse> getProductsInfo(@RequestBody ProductsRequest request);

    /**
     * 新增/修改预约商品的信息
     */
    @PostMapping("products/insertProducts")
    ResultModel<Boolean> insertProducts(@RequestBody ProductsRequest request);

    /**
     * 删除预约商品的信息
     */
    @PostMapping("products/delProducts")
    ResultModel<Boolean> delProducts(@RequestBody ProductsRequest request);

    /**
     * 上移/下移预约商品
     */
    @PostMapping("products/moveProducts")
    ResultModel<Boolean> moveProducts(@RequestBody ProductsRequest request);

    /**
     * 分页查询预约列表
     */
    @PostMapping("products/selectAppointmentPage")
    ResultModel<Map<String, Object>> selectAppointmentPage(@RequestBody AppointmentRequest request);

    /**
     * 查询预约列表详情
     */
    @PostMapping("products/getAppointmentInfo")
    ResultModel<AppointmentResponse> getAppointmentInfo(@RequestBody AppointmentRequest request);

    /**
     * 新增预约订单
     */
    @PostMapping("products/insertAppointment")
    ResultModel<Boolean> insertAppointment(@RequestBody AppointmentRequest request);

    /**
     * 修改预约订单状态
     */
    @PostMapping("products/updAppointmentState")
    ResultModel<Boolean> updAppointmentState(@RequestBody AppointmentRequest request);
}
